<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="../../common/tag.jsp" %>
<c:set var="_underFeedback" value="active" scope="request"/>
<c:set var="_pageTitle" value="反馈信息" scope="request"/>
<!DOCTYPE html>
<html>
<head>
    <title>${_pageTitle}</title>
    <%@include file="../../common/head.jsp" %>
    <link rel="stylesheet"
          href="${basePath}/vendor/layer/theme/default/layer.css" type="text/css">
</head>
<body>
<%@include file="../../common/topbar.jsp" %>
<div class="ch-container">
    <div class="row">
        <%@include file="../../common/left.jsp" %>
        <!-- main content -->
        <div class="page-header"><h3>反馈信息</h3></div>
        <c:import url="search.jsp">
            <c:param name="action" value="${basePath}/FeedBack/feedbackResult/list"/>
        </c:import>
        <br>
        <div id="list">
            <table class="table table-striped table-bordered bootstrap-datatable datatable responsive">
                <c:choose>
                    <c:when test="${not hasDatas}">
                        <tr>
                            <td>暂无查询记录!</td>
                        </tr>
                    </c:when>
                    <c:otherwise>
                        <tr>
                            <th>客户ID</th>
                            <th>车型</th>
                            <th>年份</th>
                            <th>vin</th>
                            <th
                                    <c:if test="${param.success== 1 }">style="display: none" </c:if>>错误描述
                            </th>
                            <th
                                    <c:if test="${param.success== 1 }">style="display: none" </c:if>>更多反馈
                            </th>
                            <th>补充方法</th>
                            <th>序列号</th>
                            <th>原始品牌</th>
                            <th>原始车型</th>
                            <th>原始钥匙名称</th>
                            <th>上传时间</th>
                            <th>app版本号</th>
                            <th>固件号</th>
                            <th
                                    <c:if test="${param.success== 0 }">style="display: none" </c:if>>查看图片
                            </th>
                        </tr>
                        <c:forEach var="item" items="${datas}" varStatus="it">
                            <tr>
                                <td>${item.customerId }</td>
                                <td>${item.model }</td>
                                <td>${item.year }</td>
                                <td>${item.vin }</td>
                                <td
                                        <c:if test="${param.success== 1 }">style="display: none" </c:if>>${item.errorName }</td>
                                <td
                                        <c:if test="${param.success == 1 }">style="display: none" </c:if>>${item.feedBack }</td>
                                <td>${item.additional }</td>
                                <td>${item.sn }</td>
                                <td>${item.brandName }</td>
                                <td>${item.modelName }</td>
                                <td>${item.keyName }</td>
                                <td>${item.uploadTime }</td>
                                <td>${item.appVersion }</td>
                                <td>${item.deviceVersion }</td>
                                <td
                                        <c:if test="${param.success== 0 }">style="display: none" </c:if>><a
                                        href="javascript:void(0)" class="check-image">查看图片</a>
                                    <div style="display: none; width: 200px; height: 200px"
                                         class="image-box">
                                        <div style="text-align: center">
                                            <c:forEach items="${item.imagesPathList}" var="image">
                                                <img alt=""
                                                     style="height: 300px; width: 300px; display: inline;"
                                                     src="${basePath}/FeedBack/feedbackResult/getImgByfilename?filename=${image }">
                                            </c:forEach>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </c:forEach>
                    </c:otherwise>
                </c:choose>
            </table>
        </div>
        <div class="row-fluid">
            <div class="span8">
                <c:import url="../../theme/paginator.jsp"/>
            </div>
        </div>
        <!-- end main content -->
        <!-- content ends -->

        <c:import url="../../common/footer.jsp"/>
            <script type="text/javascript" src="${basePath}/vendor/layer/layer.js"></script>
        <script type="text/javascript">
            $(document).ready(
                function () {
                    $("#query").click(function () {
                        $(this).attr("disabled", "true");
                        $("#form1").submit();
                    });
                    $(".check-image").on(
                        'click',
                        function () {
                            $('#layer-box').html(
                                $(this).parent('td').find('.image-box')
                                    .html());
                            layer.open({
                                content: $('#layer-box'),
                                type: 1,
                                area: ['650px', '600px']
                            });
                        });
                });
        </script>